package Dem01;

public class Child extends Parent{
//    private String school;
//
//    public Child(String name,int age,String school){
//        super(age, name);
//        this.school = school;
//    }
//    @Override
//    public void printInfo(){
//        super.printInfo();
//        System.out.println("School：" + school);
//    }
    public String name = "儿子李国威";
    public static int age = 18;
    public static final double weight = 88.8;
    public static String key = "kfm-lgw2";

    public static void print(){
        System.out.println("Child.print()");
    }

    public void printInfo(){
        System.out.println("name =" + name + ",age =" + age
                + ",weight=" + weight +",key=" + key );
    }
}
class Test {
    public static void main(String[] args) {
//        Child Ch = new Child("李国威", 18, "小天鹅幼儿园");
//        Ch.printInfo();
        Child child = new Child();
        Child.print();
        child.printInfo();
        System.out.println(child.name);
        System.out.println(child.age);
        System.out.println(child.weight);
        System.out.println(child.key);

        Parent child2 = new Parent();
        child2.print();
        child2.printInfo();
        System.out.println(child2.name);
        System.out.println(child2.age);
        System.out.println(child2.weight);
        System.out.println(child2.key);
    }
}
